<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>XiaoZiYan</title><meta name="author" content="XiaoZiYan"><meta name="copyright" content="XiaoZiYan"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="XiaoZiYan">
<meta property="og:url" content="https://xiaoziyanxiaoludan.gitee.io/xiaoziyan/page/3/index.html">
<meta property="og:site_name" content="XiaoZiYan">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xiaoziyanxiaoludan.gitee.io/xiaoziyan/img/avatar.jpg">
<meta property="article:author" content="XiaoZiYan">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xiaoziyanxiaoludan.gitee.io/xiaoziyan/img/avatar.jpg"><link rel="shortcut icon" href="/xiaoziyan/img/favicon.png"><link rel="canonical" href="https://xiaoziyanxiaoludan.gitee.io/xiaoziyan/page/3/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta/><link rel="stylesheet" href="/xiaoziyan/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/xiaoziyan/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":50,"languages":{"author":"作者: XiaoZiYan","link":"链接: ","source":"来源: XiaoZiYan","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"bottom-left"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: false,
  isanchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'XiaoZiYan',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2022-11-14 10:16:41'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="./css/custom.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Zfour/hexo-electric-clock@1.0.6/clock.css"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/xiaoziyan/img/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/xiaoziyan/archives/"><div class="headline">文章</div><div class="length-num">33</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/xiaoziyan/tags/"><div class="headline">标签</div><div class="length-num">41</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/xiaoziyan/categories/"><div class="headline">分类</div><div class="length-num">39</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/xiaoziyan/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 多媒体</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/xiaoziyan/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/xiaoziyan/movies/"><i class="fa-fw fas fa-video"></i><span> 视频</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/link/"><i class="fa-fw fas fa-link"></i><span> 友情链接</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/about/"><i class="fa-fw fas fa-heart"></i><span> 关于我</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/xiaoziyan/img/top_img.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/xiaoziyan/">XiaoZiYan</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/xiaoziyan/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 多媒体</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/xiaoziyan/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/xiaoziyan/movies/"><i class="fa-fw fas fa-video"></i><span> 视频</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/link/"><i class="fa-fw fas fa-link"></i><span> 友情链接</span></a></div><div class="menus_item"><a class="site-page" href="/xiaoziyan/about/"><i class="fa-fw fas fa-heart"></i><span> 关于我</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">XiaoZiYan</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://gitee.com/xiaoziyanxiaoludan" target="_blank" title="Gitee"><i class="fab fa-github"></i></a><a class="social-icon" href="/xiaoziyan/zhenghuazong@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left_radius"><a href="/xiaoziyan/2020/09/30/%E7%88%AC%E8%99%AB%E5%AD%A6%E4%B9%A002%E2%80%94%E2%80%94%E7%99%BE%E5%BA%A6%E9%A1%B5%E9%9D%A2/" title="爬虫学习02——爬整个百度页面">     <img class="post_bg" src="http://xiaoziyan.top/images/baidu.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="爬虫学习02——爬整个百度页面"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2020/09/30/%E7%88%AC%E8%99%AB%E5%AD%A6%E4%B9%A002%E2%80%94%E2%80%94%E7%99%BE%E5%BA%A6%E9%A1%B5%E9%9D%A2/" title="爬虫学习02——爬整个百度页面">爬虫学习02——爬整个百度页面</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-09-30T12:04:02.000Z" title="发表于 2020-09-30 20:04:02">2020-09-30</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E7%88%AC%E8%99%AB%E5%AD%A6%E4%B9%A0/">爬虫学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E7%88%AC%E8%99%AB%E5%AD%A6%E4%B9%A0/python/">python&quot;</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E7%88%AC%E8%99%AB%E5%AD%A6%E4%B9%A0/python/%E7%88%AC%E8%99%AB/">爬虫</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E7%88%AC%E8%99%AB/">爬虫</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/python/">python</a></span></div><div class="content">⾸先,我们还是需要回顾⼀下爬⾍的概念. 爬⾍就是我们通过我们写的程序去抓取互联⽹上的数据资源. ⽐如, 此时我需要百度的资源. 在不考虑爬⾍的情况下, 我们肯定是打开浏览器, 然后输⼊百度的⽹址,紧接着, 我们就能在浏览器上看到百度的内容了. 那换成爬⾍呢? 其实道理是⼀样的. 只不过, 我们需要⽤代码来模拟⼀个浏览器, 然后同样的输⼊百度的⽹址. 那么我们的程序应该也能拿到百度的内容. 对吧~
在python中, 我们可以直接⽤urllib模块来完成对浏览器的模拟⼯作~,
直接上代码123from urllib.request import urlopenresp = urlopen(&quot;http://www.baidu.com&quot; ) # 打开 百度print(resp.read().decode(&quot;utf-8&quot;)) # 打印 抓取到的内容

是不是很简单呢?
我们可以把抓取到的html内容全部写⼊到⽂件中, 然后和原版的百度进⾏对⽐, 看看是否⼀致
1234567from urllib.request import urlopenresp =  ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/xiaoziyan/2019/11/10/STM32%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E5%88%9D%E8%AF%86stm32/" title="STM32学习——看门狗">     <img class="post_bg" src="http://xiaoziyan.top/images/dog1.jpg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="STM32学习——看门狗"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/11/10/STM32%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E5%88%9D%E8%AF%86stm32/" title="STM32学习——看门狗">STM32学习——看门狗</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-11-10T12:12:02.000Z" title="发表于 2019-11-10 20:12:02">2019-11-10</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%AD%A6%E4%B9%A0/">学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%AD%A6%E4%B9%A0/stm32/">stm32</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%AD%A6%E4%B9%A0/stm32/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/STM32/">STM32&quot;</a></span></div><div class="content">STM32的看门狗有俩个 WWDG和IWDG 两者最大的区别就是IWDG只有一个喂食下限而WWDG顾名思义窗户必须在一个范围内喂食才能保证不会触发复位
一.IWDG（独立看门狗）1） 取消寄存器写保护（ 向 IWDG_KR 写入 0X5555）通过这步，我们取消 IWDG_PR 和 IWDG_RLR 的写保护，使后面可以操作这两个寄存器,设置 IWDG_PR 和 IWDG_RLR 的值。 这在库函数中的实现函数是：
1IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);

这个函数非常简单， 顾名思义就是开启/取消写保护，也就是使能/失能写权限。2）设置独立看门狗的预分频系数和重装载值，
123456789void IWDG_SetPrescaler(uint8_t IWDG_Prescaler); //分频系数IWDG_Prescaler_4 设置 IWDG 预分频值为 4IWDG_Prescaler_8 设置 IWDG 预分频值为 8IWDG_Prescaler_16 设置 IWDG 预分频值为 16IWDG_Prescaler_32 设置 I ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/xiaoziyan/2019/10/14/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94ADC%E3%80%81PWM/" title="C51单片机学习——ADC/PWM">     <img class="post_bg" src="http://xiaoziyan.top/images/f45614980b681dfbe655f12e7ba148cd.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="C51单片机学习——ADC/PWM"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/10/14/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94ADC%E3%80%81PWM/" title="C51单片机学习——ADC/PWM">C51单片机学习——ADC/PWM</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-14T11:12:02.000Z" title="发表于 2019-10-14 19:12:02">2019-10-14</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/">单片机学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/">STC51&quot;</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/STC51/">STC51&quot;</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%A4%96%E9%83%A8%E4%B8%AD%E6%96%AD/">外部中断</a></span></div><div class="content">ADC/PWM实验实验目的
掌握单片机外部中断电路设计
掌握C语言对中断处理程序的相关编程
掌握串行通信的基本知识
熟悉掌握使用模数转换芯ADC0808

实验原理与内容

通过过用ADC0808控制电压实现流水灯暗亮输出的设计与仿真演示，熟悉掌握使用数模转换芯ADC0808。，熟悉掌握编程软件keil及仿真软件Proteus，熟悉数组的使用及循环结构（while、for）基本用法。

实验软硬件环境硬件：PC一台、单片机试验箱
软件：keil5、proteus、单片机程序下载软件
实验过程（实验步骤、记录、数据、分析）根据需求画出仿真图                               
在keil5新建该实验的工程 
给工程添加一个C语言文件并编写驱动程序 
驱动程序代码如下：
123456789101112131415161718192021222324252627#include &lt;reg51.h&gt;#define uchar unsigned char#define uint unsigned int //定义引脚#define led P1#define ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/xiaoziyan/2019/10/13/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E8%AE%A1%E6%97%B6%E5%99%A8/" title="C51单片机学习——计时器">     <img class="post_bg" src="http://xiaoziyan.top/images/993aef2c4e09cec3a090ec3a703eaa04.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="C51单片机学习——计时器"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/10/13/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E8%AE%A1%E6%97%B6%E5%99%A8/" title="C51单片机学习——计时器">C51单片机学习——计时器</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-13T12:12:02.000Z" title="发表于 2019-10-13 20:12:02">2019-10-13</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/">单片机学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/">STC51&quot;</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/STC51/">STC51&quot;</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E8%AE%A1%E6%97%B6%E5%99%A8/">计时器</a></span></div><div class="content">计时器实验实验目的
掌握AT89C51单片机的引脚功能
掌握AT89C51最小系统电路设计
掌握C语言基本构成和基本语句
掌握P0、P1、P2和P3功能及应用技能
掌握定时器、计数器
掌握单片机的中断优先级设置

实验原理与内容
通过定时器控制 P0口的LED滚动显示的设计与仿真演示熟悉51系列内部有2个16位定时/计数器T0、T1，熟悉掌握编程软件keil及仿真软件Proteus，熟悉数组的使用及循环结构（while、for）基本用法。

实验软硬件环境硬件：PC一台、单片机试验箱
软件：keil5、proteus、单片机程序下载软件
实验过程（实验步骤、记录、数据、分析）根据需求画出仿真图                               
在keil5新建该实验的工程
给工程添加一个C语言文件并编写驱动程序 
驱动程序代码如下：
1234567891011121314151617181920212223242526272829#include &lt;reg51.h&gt;#include &lt;intrins.h&gt;#define uchar unsigned  ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/xiaoziyan/2019/10/11/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E5%A4%96%E9%83%A8%E4%B8%AD%E6%96%AD/" title="C51单片机学习——外部中断">     <img class="post_bg" src="http://xiaoziyan.top/images/ac104f60351a347c48895f896bc64220.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="C51单片机学习——外部中断"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/10/11/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E5%A4%96%E9%83%A8%E4%B8%AD%E6%96%AD/" title="C51单片机学习——外部中断">C51单片机学习——外部中断</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-11T11:12:02.000Z" title="发表于 2019-10-11 19:12:02">2019-10-11</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/">单片机学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/">STC51&quot;</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/STC51/">STC51&quot;</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%A4%96%E9%83%A8%E4%B8%AD%E6%96%AD/">外部中断</a></span></div><div class="content">实验目的
掌握AT89C51单片机的引脚功能
掌握AT89C51最小系统电路设计
掌握C语言基本构成和基本语句
掌握P0、P1、P2和P3功能及应用技能
掌握定时器、计数器
掌握单片机的中断优先级设置

实验原理与内容

实现通过外部中断来控制8个灯的状态，熟悉掌握编程软件keil及仿真软件Proteus，熟悉数组的使用及循环结构（while、for）基本用法。

实验软硬件环境硬件：PC一台、单片机试验箱
软件：keil5、proteus、单片机程序下载软件
实验过程（实验步骤、记录、数据、分析）根据需求画出仿真图     
在keil5新建该实验的工程 
给工程添加一个C语言文件并编写驱动程序 
驱动程序代码如下：
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748#include &lt;reg51.h&gt;#include &lt;intrins.h&gt;#define uint unsigned intsbit led1=P1^0;uint n=0x ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/xiaoziyan/2019/10/09/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94lcd1602%E6%B6%B2%E6%99%B6%E5%B1%8F/" title="C51单片机学习——lcd1602液晶屏">     <img class="post_bg" src="http://xiaoziyan.top/images/3fe2d4f7f8aa0e706e4d555656cb673a.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="C51单片机学习——lcd1602液晶屏"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/10/09/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94lcd1602%E6%B6%B2%E6%99%B6%E5%B1%8F/" title="C51单片机学习——lcd1602液晶屏">C51单片机学习——lcd1602液晶屏</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-09T12:12:02.000Z" title="发表于 2019-10-09 20:12:02">2019-10-09</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/">单片机学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/">STC51&quot;</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/STC51/">STC51&quot;</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/LCD1602/">LCD1602</a></span></div><div class="content">lcd1602液晶屏实验实验目的
掌握AT89C51单片机的引脚功能
掌握AT89C51最小系统电路设计
掌握C语言基本构成和基本语句
掌握P0、P1、P2和P3功能及应用技能

实验原理与内容
实现通过单片机控制1602显示屏显示自己的学号姓名，熟悉掌握编程软件keil及仿真软件Proteus，熟悉数组的使用及循环结构（while、for）基本用法。

实验软硬件环境硬件：PC一台、单片机试验箱
软件：keil5、proteus、单片机程序下载软件
实验过程（实验步骤、记录、数据、分析）根据需求画出仿真图
在keil5新建该实验的工程
给工程添加一个C语言文件并编写驱动程序
驱动程序代码如下：     
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384#include &lt;reg51.h&gt;unsigned c ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/xiaoziyan/2019/10/08/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E6%8C%89%E9%94%AE%E6%8E%A7%E5%88%B6/" title="C51单片机学习——按键控制">     <img class="post_bg" src="http://xiaoziyan.top/images/84c58abc41610ee19e1a478f91088e69.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="C51单片机学习——按键控制"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/10/08/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E6%8C%89%E9%94%AE%E6%8E%A7%E5%88%B6/" title="C51单片机学习——按键控制">C51单片机学习——按键控制</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-08T03:12:02.000Z" title="发表于 2019-10-08 11:12:02">2019-10-08</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/">单片机学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/">STC51&quot;</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/STC51/">STC51&quot;</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E6%8C%89%E9%94%AE%E6%8E%A7%E5%88%B6/">按键控制</a></span></div><div class="content">按键控制灯实验实验目的
掌握AT89C51单片机的引脚功能
掌握AT89C51最小系统电路设计
掌握C语言基本构成和基本语句
掌握P0、P1、P2和P3功能及应用技能

实验原理与内容
通过一个按键，实现按键控制流水灯的停止和开启，熟悉掌握编程软件keil及仿真软件Proteus，熟悉数组的使用及循环结构（while、for、switch）基本用法。
按钮控制灯亮接线原理图如图11所示。在单片机的P1口的低4位按上按钮，在高4位接上发光二极管。当按下SB1时(P1.0口为“0”)，LED1发亮(P1.4口为“0”)。同理，若分别按下SB2、SB3、SB4，则对应的端口P1.5、P1.6、P1.7输出低电平，对应的发光二极管LED2、LED3、LED4就发亮。
若同时按下两个以上的按钮，则对应的发光二极管发亮。例如按下SB1和SB3，则对应的输出端口P1.4和P1.6输出为低电平，对应的发光二极管LED1、LED3发亮。

实验软硬件环境硬件：PC一台、单片机试验箱
软件：keil5、proteus、单片机程序下载软件
实验过程（实验步骤、记录、数据、分析）程序流程图
画仿真图使用pro ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/xiaoziyan/2019/10/06/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E6%B5%81%E6%B0%B4%E7%81%AF/" title="C51单片机学习——流水灯">     <img class="post_bg" src="http://xiaoziyan.top/images/adb7f9eca04e6f962fe5f3e4a54d1d12.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="C51单片机学习——流水灯"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/10/06/C51%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E6%B5%81%E6%B0%B4%E7%81%AF/" title="C51单片机学习——流水灯">C51单片机学习——流水灯</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-06T13:12:02.000Z" title="发表于 2019-10-06 21:12:02">2019-10-06</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/">单片机学习</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/">STC51&quot;</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%8D%95%E7%89%87%E6%9C%BA%E5%AD%A6%E4%B9%A0/STC51/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/STC51/">STC51&quot;</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/">单片机</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E6%B5%81%E6%B0%B4%E7%81%AF/">流水灯</a></span></div><div class="content">单片机引脚、晶振、复位的作用


复位电路：，复位是单片机的初始化操作。单片机启动时都需要先付薇，其作用是“清零”，也就    是CPU和其他部件处于一个确定的初始状态，并从这个初始状态开始。

复位实质上是单片机的复位脚保持很短时间的高电平，按键复位就是通过按键接高电平（按一下的时间已经足够）

时钟电路（晶振）：产生时间信号，使单片机按照一定的时间规律进行指令，晶振频率越高，时钟信号的周期就小，单片机运行也就越快。





32个I/O口
P1.0 ~ P1.7 对应1 ~ 8 号引脚
P2.0 ~ P2.7 对应21 ~ 28 号引脚
P3.0 ~ P3.7 对应10 ~ 17 号引脚
P0.0 ~ P0.7 对应39 ~ 32 号引脚
其中，P3口除作标准I/O口外，还可以将每一位用于第二功能：


其他引脚功能：

单片机的周期
时钟周期：


也称振荡周期，是时钟频率的倒数，就看晶振是多少HZ的，若是12MHZ的，时钟周期就是1/12微秒，他是单片机中最小的时间单位，在一个时钟周期内单片机仅能完成一个最基本的动作。


机器周期：


是单片机的基本操作周期，为时钟周期的 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/xiaoziyan/2019/09/22/%E6%98%BE%E7%A4%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E7%89%87/" title="Hexo博客多媒体的多种操作">     <img class="post_bg" src="http://xiaoziyan.top/images/10e9f75e8812959f68c1a279dcd70da8.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="Hexo博客多媒体的多种操作"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/09/22/%E6%98%BE%E7%A4%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E7%89%87/" title="Hexo博客多媒体的多种操作">Hexo博客多媒体的多种操作</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-09-22T15:28:02.000Z" title="发表于 2019-09-22 23:28:02">2019-09-22</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%9B%BE%E7%89%87/">图片</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%9B%BE%E7%89%87/%E8%A7%86%E9%A2%91/">视频</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%9B%BE%E7%89%87/%E8%A7%86%E9%A2%91/%E5%9B%BE%E5%BA%8A/">图床</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%9B%BE%E7%89%87/%E8%A7%86%E9%A2%91/%E5%9B%BE%E5%BA%8A/%E8%A7%86%E9%A2%91/">视频</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/%E5%9B%BE%E7%89%87/%E8%A7%86%E9%A2%91/%E5%9B%BE%E5%BA%8A/%E8%A7%86%E9%A2%91/Hexo%E5%8D%9A%E5%AE%A2%E7%9A%84%E4%BD%BF%E7%94%A8/">Hexo博客的使用</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/Typora/">Typora</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%9B%BE%E7%89%87/">图片</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E8%A7%86%E9%A2%91/">视频</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%9B%BE%E5%BA%8A/">图床</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/gitee/">gitee</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/Picgo/">Picgo</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%B5%8C%E5%85%A5%E8%A7%86%E9%A2%91/">嵌入视频</a></span></div><div class="content">显示本地图片如果你的博客也是通过Hexo框架建立的，在使用初期你可能也遇到过和我相似的问题：在一个.md文件中添加的图片，在Typora编辑器里面可以预览，但是程序一跑起来就显示不出来。

运行起来后不显示。

下面分享一种解决此问题的方法：

修改博客配置。
下载插件。

修改博客配置修改博客根目录中_config.yml文件的配置项post_asset_folder为true：
1post_asset_folder: true


完成此设置后，当你通过hexo new 文件名新建博客后，会产生一个和文件同名的文件夹。

下载插件在博客根目录中下使用npm安装插件：
1npm install https://github.com/CodeFalling/hexo-asset-image --save

示例当文章需要添加图片时，将需要添加的图片放入同名的文件夹中，同时通过相对路径索引到该图片。
例如我在上方修改博客配置中展示的那张图片的md源码为：

1![示例](a.jpg)

使用命令hexo s开启服务，若无报错在本地可以看到图片在博客中正确显示。

利用图床显示图片Picg ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/xiaoziyan/2019/08/19/Markdown%E7%9A%84%E6%97%A5%E5%B8%B8%E4%BD%BF%E7%94%A8/" title="Markdown的日常使用语法">     <img class="post_bg" src="http://xiaoziyan.top/images/5252742a7687ed181ad65716890688f5.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="Markdown的日常使用语法"></a></div><div class="recent-post-info"><a class="article-title" href="/xiaoziyan/2019/08/19/Markdown%E7%9A%84%E6%97%A5%E5%B8%B8%E4%BD%BF%E7%94%A8/" title="Markdown的日常使用语法">Markdown的日常使用语法</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-08-19T08:12:02.000Z" title="发表于 2019-08-19 16:12:02">2019-08-19</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/xiaoziyan/categories/Hexo/">Hexo</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/Hexo/markdown/">markdown</a><i class="fas fa-angle-right"></i><a class="article-meta__categories" href="/xiaoziyan/categories/Hexo/markdown/Hexo%E5%8D%9A%E5%AE%A2%E7%9A%84%E4%BD%BF%E7%94%A8/">Hexo博客的使用</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/">学习</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/Hexo/">Hexo&quot;</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/markdown/">markdown</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/xiaoziyan/tags/Typora/">Typora</a></span></div><div class="content">Markdown 的快速入门(后缀是 .md)快捷键12ctrl+shift+1 大纲显示ctrl+/ 源代码显示

代码块：1​```java(html等等)   会自动提示

标题12345#标题1 （大）##标题2###标题3####标题4 （小）以此类推 最高标题6

加粗12345678//加粗**加粗**//代码高亮显示==高亮==//删除线~~删除线~~//斜体  *斜体内容*

引用：1234//引用语法&gt;作者：xiaoziyan&gt;&gt;作者：xiaoziyan&gt;&gt;&gt;作者：xiaoziyan


作者：xiaoziyan

作者：xiaoziyan

作者：xiaoziyan



分割线123//分割线---***

图片插入12//在线图片与本地图片![照片介绍]（图片url或者优化后的本地地址）


超链接12//超链接语法[超链接名字]（https://xiaoziyanxiaoludan.gitee.io/xiaoziyan）

小紫嫣博客
列表123456//无需列表- 目录1  -后加空格- 目录2- 目录3//有序列表   ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/xiaoziyan/page/2/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/xiaoziyan/">1</a><a class="page-number" href="/xiaoziyan/page/2/#content-inner">2</a><span class="page-number current">3</span><a class="page-number" href="/xiaoziyan/page/4/#content-inner">4</a><a class="extend next" rel="next" href="/xiaoziyan/page/4/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/xiaoziyan/img/avatar.jpg" onerror="this.onerror=null;this.src='/xiaoziyan/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">XiaoZiYan</div><div class="author-info__description"></div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/xiaoziyan/archives/"><div class="headline">文章</div><div class="length-num">33</div></a></div><div class="card-info-data-item is-center"><a href="/xiaoziyan/tags/"><div class="headline">标签</div><div class="length-num">41</div></a></div><div class="card-info-data-item is-center"><a href="/xiaoziyan/categories/"><div class="headline">分类</div><div class="length-num">39</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://gitee.com/xiaoziyanxiaoludan"><i class="fab fa-gitee"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://gitee.com/xiaoziyanxiaoludan" target="_blank" title="Gitee"><i class="fab fa-github"></i></a><a class="social-icon" href="/xiaoziyan/zhenghuazong@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">冲啊！奥里给！</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/xiaoziyan/2021/08/06/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E8%AE%BE%E8%AE%A1/" title="智慧农业——大数据后台展示设计"><img src="http://xiaoziyan.top/images/3205a9c3fa4e72ebd71a6101d2812929.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="智慧农业——大数据后台展示设计"/></a><div class="content"><a class="title" href="/xiaoziyan/2021/08/06/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E8%AE%BE%E8%AE%A1/" title="智慧农业——大数据后台展示设计">智慧农业——大数据后台展示设计</a><time datetime="2021-08-06T10:12:02.000Z" title="发表于 2021-08-06 18:12:02">2021-08-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/xiaoziyan/2021/08/05/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E5%89%8D%E7%AB%AF%E8%AE%BE%E8%AE%A1/" title="智慧农业——前端控制设计"><img src="http://xiaoziyan.top/images/e610f1279851b9e6e3f4c338cfede87f.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="智慧农业——前端控制设计"/></a><div class="content"><a class="title" href="/xiaoziyan/2021/08/05/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E5%89%8D%E7%AB%AF%E8%AE%BE%E8%AE%A1/" title="智慧农业——前端控制设计">智慧农业——前端控制设计</a><time datetime="2021-08-05T10:12:02.000Z" title="发表于 2021-08-05 18:12:02">2021-08-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/xiaoziyan/2021/08/03/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E5%BC%80%E5%8F%91/" title="智慧农业——驱动程序设计"><img src="http://xiaoziyan.top/images/a7944f919383883f23a8b3f45788ae9c.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="智慧农业——驱动程序设计"/></a><div class="content"><a class="title" href="/xiaoziyan/2021/08/03/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E5%BC%80%E5%8F%91/" title="智慧农业——驱动程序设计">智慧农业——驱动程序设计</a><time datetime="2021-08-03T07:12:02.000Z" title="发表于 2021-08-03 15:12:02">2021-08-03</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/xiaoziyan/2021/08/02/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E7%A1%AC%E4%BB%B6%E8%AE%BE%E8%AE%A1/" title="智慧农业——硬件设计"><img src="http://xiaoziyan.top/images/69f7d86180b45b7eabeb284a540905af.jpeg" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="智慧农业——硬件设计"/></a><div class="content"><a class="title" href="/xiaoziyan/2021/08/02/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A%E7%A1%AC%E4%BB%B6%E8%AE%BE%E8%AE%A1/" title="智慧农业——硬件设计">智慧农业——硬件设计</a><time datetime="2021-08-02T10:12:02.000Z" title="发表于 2021-08-02 18:12:02">2021-08-02</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/xiaoziyan/2020/10/18/Internet%E5%8D%8F%E8%AE%AE%E5%88%86%E6%9E%90%E2%80%94%E2%80%94ARP%E5%8D%8F%E8%AE%AE%E5%92%8CMAC%E5%B8%A7%E5%88%86%E6%9E%90/" title="Internet协议分析——ARP协议和MAC帧分析"><img src="http://xiaoziyan.top/images/37dbb6fd52663318.png" onerror="this.onerror=null;this.src='/xiaoziyan/img/404.jpg'" alt="Internet协议分析——ARP协议和MAC帧分析"/></a><div class="content"><a class="title" href="/xiaoziyan/2020/10/18/Internet%E5%8D%8F%E8%AE%AE%E5%88%86%E6%9E%90%E2%80%94%E2%80%94ARP%E5%8D%8F%E8%AE%AE%E5%92%8CMAC%E5%B8%A7%E5%88%86%E6%9E%90/" title="Internet协议分析——ARP协议和MAC帧分析">Internet协议分析——ARP协议和MAC帧分析</a><time datetime="2020-10-18T04:12:02.000Z" title="发表于 2020-10-18 12:12:02">2020-10-18</time></div></div></div></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/xiaoziyan/tags/%E5%AD%A6%E4%B9%A0/" style="font-size: 1.45em; color: rgb(58, 18, 67)">学习</a><a href="/xiaoziyan/tags/AT%E5%91%BD%E4%BB%A4/" style="font-size: 1.15em; color: rgb(6, 137, 173)">AT命令</a><a href="/xiaoziyan/tags/STC51/" style="font-size: 1.32em; color: rgb(197, 14, 88)">STC51"</a><a href="/xiaoziyan/tags/%E5%8D%95%E7%89%87%E6%9C%BA/" style="font-size: 1.36em; color: rgb(42, 140, 75)">单片机</a><a href="/xiaoziyan/tags/%E5%A4%96%E9%83%A8%E4%B8%AD%E6%96%AD/" style="font-size: 1.19em; color: rgb(41, 101, 56)">外部中断</a><a href="/xiaoziyan/tags/LCD1602/" style="font-size: 1.15em; color: rgb(60, 30, 90)">LCD1602</a><a href="/xiaoziyan/tags/%E6%8C%89%E9%94%AE%E6%8E%A7%E5%88%B6/" style="font-size: 1.15em; color: rgb(128, 199, 149)">按键控制</a><a href="/xiaoziyan/tags/%E6%B5%81%E6%B0%B4%E7%81%AF/" style="font-size: 1.15em; color: rgb(148, 5, 178)">流水灯</a><a href="/xiaoziyan/tags/%E8%AE%A1%E6%97%B6%E5%99%A8/" style="font-size: 1.15em; color: rgb(15, 72, 117)">计时器</a><a href="/xiaoziyan/tags/TCP-IP%E6%A6%82%E8%BF%B0/" style="font-size: 1.15em; color: rgb(98, 132, 169)">TCP/IP概述</a><a href="/xiaoziyan/tags/%E5%88%A9%E7%94%A8GNS%E8%AE%BE%E8%AE%A1%E7%BD%91%E7%BB%9C/" style="font-size: 1.15em; color: rgb(13, 148, 75)">利用GNS设计网络</a><a href="/xiaoziyan/tags/%E5%8D%8F%E8%AE%AE%E5%88%86%E6%9E%90%E5%B7%A5%E5%85%B7/" style="font-size: 1.15em; color: rgb(43, 159, 32)">协议分析工具</a><a href="/xiaoziyan/tags/Hexo/" style="font-size: 1.19em; color: rgb(127, 15, 190)">Hexo"</a><a href="/xiaoziyan/tags/markdown/" style="font-size: 1.15em; color: rgb(4, 137, 7)">markdown</a><a href="/xiaoziyan/tags/Typora/" style="font-size: 1.19em; color: rgb(13, 10, 139)">Typora</a><a href="/xiaoziyan/tags/Gitee/" style="font-size: 1.15em; color: rgb(33, 51, 31)">Gitee</a><a href="/xiaoziyan/tags/git/" style="font-size: 1.15em; color: rgb(171, 101, 53)">git</a><a href="/xiaoziyan/tags/hexo/" style="font-size: 1.19em; color: rgb(76, 42, 98)">hexo</a><a href="/xiaoziyan/tags/STM32/" style="font-size: 1.15em; color: rgb(71, 147, 199)">STM32"</a><a href="/xiaoziyan/tags/%E5%9B%BE%E7%89%87/" style="font-size: 1.15em; color: rgb(66, 143, 113)">图片</a><a href="/xiaoziyan/tags/%E8%A7%86%E9%A2%91/" style="font-size: 1.15em; color: rgb(147, 107, 32)">视频</a><a href="/xiaoziyan/tags/%E5%9B%BE%E5%BA%8A/" style="font-size: 1.15em; color: rgb(39, 117, 10)">图床</a><a href="/xiaoziyan/tags/gitee/" style="font-size: 1.15em; color: rgb(178, 34, 41)">gitee</a><a href="/xiaoziyan/tags/Picgo/" style="font-size: 1.15em; color: rgb(191, 122, 126)">Picgo</a><a href="/xiaoziyan/tags/%E5%B5%8C%E5%85%A5%E8%A7%86%E9%A2%91/" style="font-size: 1.15em; color: rgb(3, 92, 112)">嵌入视频</a><a href="/xiaoziyan/tags/ARP%E5%8D%8F%E8%AE%AE%E5%92%8CMAC%E5%B8%A7%E5%88%86%E6%9E%90/" style="font-size: 1.15em; color: rgb(140, 175, 39)">ARP协议和MAC帧分析</a><a href="/xiaoziyan/tags/%E6%99%BA%E6%85%A7%E5%86%9C%E4%B8%9A/" style="font-size: 1.28em; color: rgb(63, 13, 177)">智慧农业</a><a href="/xiaoziyan/tags/PCB/" style="font-size: 1.28em; color: rgb(96, 33, 163)">PCB</a><a href="/xiaoziyan/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 1.15em; color: rgb(174, 180, 55)">前端</a><a href="/xiaoziyan/tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" style="font-size: 1.15em; color: rgb(52, 171, 181)">大数据</a><a href="/xiaoziyan/tags/%E7%AB%8B%E5%88%9BEDA/" style="font-size: 1.15em; color: rgb(74, 114, 59)">立创EDA</a><a href="/xiaoziyan/tags/%E7%88%AC%E8%99%AB/" style="font-size: 1.41em; color: rgb(171, 0, 76)">爬虫</a><a href="/xiaoziyan/tags/python/" style="font-size: 1.41em; color: rgb(161, 14, 53)">python</a><a href="/xiaoziyan/tags/klie/" style="font-size: 1.15em; color: rgb(143, 107, 0)">klie</a><a href="/xiaoziyan/tags/web/" style="font-size: 1.15em; color: rgb(60, 132, 144)">web</a><a href="/xiaoziyan/tags/HTTP/" style="font-size: 1.15em; color: rgb(62, 87, 146)">HTTP</a><a href="/xiaoziyan/tags/requests/" style="font-size: 1.15em; color: rgb(66, 52, 20)">requests</a><a href="/xiaoziyan/tags/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/" style="font-size: 1.15em; color: rgb(131, 192, 165)">正则表达式</a><a href="/xiaoziyan/tags/re%E6%A8%A1%E5%9D%97/" style="font-size: 1.19em; color: rgb(5, 53, 83)">re模块</a><a href="/xiaoziyan/tags/bs4%E6%A8%A1%E5%9D%97/" style="font-size: 1.24em; color: rgb(22, 155, 93)">bs4模块</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/xiaoziyan/archives/2021/08/"><span class="card-archive-list-date">八月 2021</span><span class="card-archive-list-count">4</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/xiaoziyan/archives/2020/10/"><span class="card-archive-list-date">十月 2020</span><span class="card-archive-list-count">16</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/xiaoziyan/archives/2020/09/"><span class="card-archive-list-date">九月 2020</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/xiaoziyan/archives/2019/11/"><span class="card-archive-list-date">十一月 2019</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/xiaoziyan/archives/2019/10/"><span class="card-archive-list-date">十月 2019</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/xiaoziyan/archives/2019/09/"><span class="card-archive-list-date">九月 2019</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/xiaoziyan/archives/2019/08/"><span class="card-archive-list-date">八月 2019</span><span class="card-archive-list-count">4</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">33</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2018-06-06T16:00:00.000Z"></div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-11-14T02:16:41.640Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By XiaoZiYan</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><p><a style="margin-inline:5px"target="_blank" href="https://hexo.io/"> <img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&logo=hexo" title="博客框架为 Hexo" alt="HEXO"></a><a style="margin-inline:5px"target="_blank"href="https://butterfly.js.org/"> <img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&logo=bitdefender" title="主题采用 Butterfly" alt="Butterfly"></a><a style="margin-inline:5px"target="_blank" href="https://www.jsdelivr.com/"> <img src="https://img.shields.io/badge/CDN-jsDelivr-orange?style=flat&logo=jsDelivr" title="本站使用 Jsdelivr 为静态资源提供CDN加速" alt="Jsdelivr"></a><a style="margin-inline:5px"target="_blank" href="https://github.com/"> <img src="https://img.shields.io/badge/Source-gitee-d021d6?style=flat&logo=Gitee" title="本站项目由 Gitee 托管" alt="Gitee"></a><a style="margin-inline:5px"target="_blank"href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> <img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&logo=Claris" alt="img" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"></a></p></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/xiaoziyan/js/utils.js"></script><script src="/xiaoziyan/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function subtitleType () {
  if (true) { 
    var typed = new Typed("#subtitle", {
      strings: "事事顺利，永无BUG".split(","),
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50
    })
  } else {
    document.getElementById("subtitle").innerHTML = '事'
  }
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}</script></div><script src="./js/sakura.js"></script><canvas class="fireworks" mobile="false"></canvas><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/fireworks.min.js"></script><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="true"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --><script data-pjax>function electric_clock_injector_config(){
                var parent_div_git = document.getElementsByClassName('sticky_layout')[0];
                var item_html = '<div class="card-widget card-clock"><div class="card-glass"><div class="card-background"><div class="card-content"><div id="hexo_electric_clock"><img id="card-clock-loading" src="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-clock/clock/images/weather/loading.gif" style="height: 120px; width: 100%;" data-ll-status="loading" class="entered loading"></div></div></div></div></div>';
                console.log('已挂载electric_clock')
                // parent_div_git.innerHTML=item_html+parent_div_git.innerHTML // 无报错，但不影响使用(支持pjax跳转)
                parent_div_git.insertAdjacentHTML("afterbegin",item_html) // 有报错，但不影响使用(支持pjax跳转)
            }if( document.getElementsByClassName('sticky_layout')[0] && (location.pathname ==='all'|| 'all' ==='all')){

            electric_clock_injector_config()
        } </script><script src="https://pv.sohu.com/cityjson?ie=utf-8"></script><script data-pjax  src="https://cdn.jsdelivr.net/gh/Zfour/hexo-electric-clock@1.0.6/clock.js"></script><!-- hexo injector body_end end --></body></html>